<?php

namespace common\models;

use Yii;

/**
 * This is the model class for table "goods_ext".
 *
 * @property string $goods_ext_id
 * @property integer $goods_id
 * @property string $goods_desc
 * @property string $goods_main
 * @property string $buy_limit
 */
class GoodsExt extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'd_try.goods_ext';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['goods_id'], 'integer'],
            [['goods_main', 'buy_limit'], 'required'],
            [['goods_main', 'buy_limit'], 'string'],
            [['goods_desc'], 'string', 'max' => 255],
            [['goods_id'], 'unique'],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'goods_ext_id' => 'Goods Ext ID',
            'goods_id' => 'Goods ID',
            'goods_desc' => 'Goods Desc',
            'goods_main' => 'Goods Main',
            'buy_limit' => 'Buy Limit',
        ];
    }
}
